package cn.koala.key.receipt.service.impl;

import cn.koala.key.api.KeyManagementApi;
import cn.koala.key.common.feign.FeignUtils;
import cn.koala.key.entity.BorrowOrderReturn;
import cn.koala.key.receipt.dto.BorrowOrderReturnDTO;
import cn.koala.key.receipt.service.BorrowOrderReturnService;
import cn.seed.common.core.Result;
import org.springframework.stereotype.Service;

@Service
public class BorrowOrderReturnServiceImpl implements BorrowOrderReturnService {

    @Override
    public Result<BorrowOrderReturn> getByOrderNo(String orderNo) {
        return FeignUtils.getHttpApi(KeyManagementApi.class).selectBorrowOrderReturnByOrderNo(orderNo);
    }

    @Override
    public Result create(BorrowOrderReturn borrowOrderReturn) {
        return FeignUtils.getHttpApi(KeyManagementApi.class).createBorrowOrderReturn(borrowOrderReturn);
    }

    @Override
    public Result confirmReturn(BorrowOrderReturnDTO borrowOrderReturnDTO) {
        return FeignUtils.getHttpApi(KeyManagementApi.class).confirmReturn(borrowOrderReturnDTO);
    }
}
